From: Matthias Clasen Date: Wed, 31 Jan 2018 16:44:26 +0000 (+0100) Subject: iconview: Fix a problem with the previous change X-Git-Tag: archive/raspbian/3.24.39-1+rpi1~1^2~65^2~38^2~40 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=9b69fe7a7ed73b195cb8f996b3c1e6cfc46402b7;p=gtk%2B3.0.git iconview: Fix a problem with the previous change After commit ffef28a7e8d5ffef7de6a3baccb30b0021b6b0ff, gtk-icon-browser was spewing critical warnings when changing sections. Avoid that by respecting the return value of gtk_tree_model_get_iter. --- diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c index 4b364d53c3..6de96bf09b 100644 --- a/gtk/gtkiconview.c +++ b/gtk/gtkiconview.c @@ -3510,8 +3510,8 @@ gtk_icon_view_row_deleted (GtkTreeModel *model, if (gtk_tree_path_get_depth (path) > 1) return; - gtk_tree_model_get_iter (model, &iter, path); - gtk_tree_model_unref_node (model, &iter); + if (gtk_tree_model_get_iter (model, &iter, path)) + gtk_tree_model_unref_node (model, &iter); index = gtk_tree_path_get_indices(path)[0];